import Vue from "vue";
import Router from "vue-router";
import Login from "@/pages/login";
import Home from "@/pages/Home";
import Index from "@/pages/index";
import Error from "@/pages/error";

// 开发管理
import Permission from "@/pages/develop/permission";
import Menu from "@/pages/develop/menu";

// 管理员管理
import Role from "@/pages/admin/role";
import Admin from "@/pages/admin/index";
import Password from "@/pages/admin/password";

// 商品管理
import Goods from "@/pages/goods";
import GoodsAttr from "@/pages/goods/attr";
import GoodsCate from "@/pages/goods/cate";

// 盲盒管理
import BlindBox from "@/pages/blind/index";
import BlindBoxGoods from "@/pages/blind/goods";
import BlindBoxGoodsLevel from "@/pages/blind/goodsLevel";

// 福利屋管理
import WealRooms from "@/pages/weal/index";

// 红包管理
import RedPackets from "@/pages/redpackets/index";

// 系统公告
import SystemAnnouncement from "../pages/content/systemAnnouncement.vue";

// 福利屋订单
import WealRoomsOrders from "@/pages/order/wealRoomsOrders";

// 福利屋订单列表
import WealRoomsOrdersPrizes from "@/pages/weal/wealRoomsOrderPrizes";

// 支付设置
import PaySettings from "@/pages/setting/paySettings";

// 用户管理：等级，用户角色,下发必出
import User from "@/pages/user";
import UserLevel from "@/pages/user/userLevel";
import UserRole from "@/pages/user/userRole";
import UserCoupon from "@/pages/user/userCoupon";
import UserBackCard from "@/pages/user/userBackCard";

// 内容管理：版本，弹窗，图片
import Version from "@/pages/content/version";
import Pop from "@/pages/content/pop";
import Image from "@/pages/content/image";
import Question from "@/pages/content/question";
import QuestionCate from "@/pages/content/questionCate";
import Content from "@/pages/content";
import ContentCate from "@/pages/content/contentCate";
import Banner from "@/pages/content/banner";
import Express from "@/pages/content/express";

// 充值订单，面板
import RechargePanel from "@/pages/recharge/panel";

//无限赏集卡
import themeIndex from "@/pages/theme/index";

// 运营管理
import RechargeOrder from "@/pages/finance/rechargeOrder"; // 充值订单
import Commission from "@/pages/finance/commission"; // 佣金
import UserWithdraw from "@/pages/finance/userWithdraw"; // 提现列表
import Cooperate from "@/pages/operate/cooperate";
import Feedback from "@/pages/operate/feedback";

// 用户盒柜， 开盒订单
import BlindBoxOrderPrize from "@/pages/blind/orderPrize";
import BlindBoxOrder from "@/pages/order/blindBoxOrder";

import BlindBoxOrderPrizeLog from "@/pages/blind/orderPrizeLog";

import Order from "@/pages/order/index";
import TakeOrder from "@/pages/order/takeOrder";
import Setting from "@/pages/setting/setting";
import Freight from "@/pages/setting/freight";
import Area from "@/pages/setting/area";
import ExpressInfo from "@/pages/order/expressInfo";

// 运营管理
import Coupon from "@/pages/operate/coupon";
import BackCard from "@/pages/operate/backCard";
import CouponPanel from "@/pages/operate/couponPanel";
import SignPanel from "@/pages/operate/signPanel";
import Promotion from "@/pages/operate/promotion";
import Task from "@/pages/operate/task";
import Rank from "@/pages/operate/rank";
import UserData from "@/pages/operate/userData";
import BoxData from "@/pages/operate/boxData";

// 日志
import AdminRechargeLog from "@/pages/log/adminRechargeLog";
import AdminActionLog from "@/pages/log/adminActionLog";
import AdminActionLogs from "@/pages/log/adminActionLogs";
import SmsLog from "@/pages/log/smsLog";
import BalanceLog from "@/pages/log/balanceLog";
import AmountLog from "@/pages/log/amountLog";
import UserProfileLog from "@/pages/log/userProfileLog";
import UserLevelModify from "@/pages/log/userLevelModify";
import UserParentModify from "@/pages/log/userParentModify";

import BlindBoxGiveOrder from "@/pages/user/blindBoxGiveOrder";

//用户白名单
import WhiteList from "../pages/user/whiteList.vue";

//擂台白名单
import BoxInUser from "../pages/user/BoxInUser.vue";
//随机码
import ChallengeBoxBlack from "@/pages/user/challengeBoxBlack.vue";

import LuckDrawWhites from "../pages/user/luckWhite.vue";


//机器人
import Robots from "@/pages/user/robots.vue";

//爬塔
import ClimbTowers from "@/pages/tower/index.vue";
//爬塔订单
import ClimbTowerOrders from "@/pages/order/climbTowerOrders.vue";
//塔宝箱赏品
import TowerTreasureBoxPrizes from "@/pages/tower/towerTreasureBoxPrizes.vue";
//塔宝箱商品
import TowerTreasureGoods from "@/pages/tower/goods.vue";
//pata
import ClimbTowerOrderPrizes from "@/pages/tower/orderPrize.vue";

//pata
import FusionGoods from "@/pages/fusion/goods.vue";

//塔宝箱赏品
import FusionPrizes from "@/pages/fusion/fusionPrizes.vue";
//融合记录
import FusionLogs from "@/pages/fusion/fusionLog.vue";
//用户融合订单
import FusionOrderPrizes from "@/pages/user/fusionOrderPrizes.vue";

//用户融合赠礼记录
import FusionGiveOrders from "@/pages/fusion/fusionGiveOrder.vue";

//用户宝箱福袋
import ChallengeUserBoxBags from "@/pages/boxbag/index.vue";

//擂台管理
import ChallengeBox from "@/pages/challenge/index";
import ChallengeBoxGoodsLevels from "@/pages/challenge/goodsLevel";
import ChallengeBoxGoods from "@/pages/challenge/goods";
import ChallengeBoxPrizes from "@/pages/challenge/treasureBox";
import ChallengeBoxOrderPrizes from "@/pages/challenge/orderPrize";
import ChallengeBoxPrizesEmptys from "@//pages/challenge/empty";
//擂台赠礼
import ChallengeBoxGiveOrders from "@/pages/user/challengeBoxGiveOrder";
import ChallengeBoxOrders from "@/pages/order/challengeBoxOrders";

//幸运屋
import LuckDraws from "@/pages/luck/index.vue";
//随机码
import LuckDrawCodes from "@/pages/luck/code.vue";

import Loss from "@/pages/user/loss.vue";

//塔
import ClimbTowerBoxs from "@/pages/tower/boxIndex.vue";

//定制套
import CustomCommissions from "@/pages/user/customCommission.vue";
//无限宝箱
import BlindBoxPrizes from "@/pages/blind/treasureBox.vue";

Vue.use(Router);
const originalPush = Router.prototype.push;
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err);
};
export default new Router({
  routes: [//
    {
      path: "/login",
      name: "login",
      component: Login
    },
    {
      path: "/",
      name: "home",
      component: Home,
      children: [
        {
          path: "blindBoxOrderPrizeLog",
          name: "blindBoxOrderPrizeLog",
          component: BlindBoxOrderPrizeLog
        },
        {
          path: "blindBoxPrizes",
          name: "blindBoxPrizes",
          component: BlindBoxPrizes
        },
        {
          path: "customCommissions",
          name: "customCommissions",
          component: CustomCommissions
        },
        {
          path: "climbTowerBoxs",
          name: "climbTowerBoxs",
          component: ClimbTowerBoxs
        },
        {
          path: "loss",
          name: "loss",
          component: Loss
        },
        {
          path: "challengeBoxBlack",
          name: "challengeBoxBlack",
          component: ChallengeBoxBlack
        },
        {
          path: "luckDrawWhites",
          name: "luckDrawWhites",
          component: LuckDrawWhites
        },
        {
          path: "luckDrawCodes",
          name: "luckDrawCodes",
          component: LuckDrawCodes
        },
        {
          path: "luckDraws",
          name: "luckDraws",
          component: LuckDraws
        },
        {
          path: "challengeUserBoxBags",
          name: "challengeUserBoxBags",
          component: ChallengeUserBoxBags
        },
        {
          path: "boxInUser",
          name: "boxInUser",
          component: BoxInUser
        },
        {
          path: "challengeBox",
          name: "challengeBox",
          component: ChallengeBox
        },
        {
          path: "challengeBoxOrderPrizes",
          name: "challengeBoxOrderPrizes",
          component: ChallengeBoxOrderPrizes
        },
        {
          path: "challengeBoxPrizes",
          name: "challengeBoxPrizes",
          component: ChallengeBoxPrizes
        },
        {
          path: "challengeBoxGoods",
          name: "challengeBoxGoods",
          component: ChallengeBoxGoods
        },
        {
          path: "challengeBoxGoodsLevels",
          name: "challengeBoxGoodsLevels",
          component: ChallengeBoxGoodsLevels
        },
        {
          path: "challengeBoxGiveOrders",
          name: "challengeBoxGiveOrders",
          component: ChallengeBoxGiveOrders
        },
        {
          path: "challengeBoxOrders",
          name: "challengeBoxOrders",
          component: ChallengeBoxOrders
        },
        {
          path: "challengeBoxPrizesEmptys",
          name: "challengeBoxPrizesEmptys",
          component: ChallengeBoxPrizesEmptys
        },
        {
          path: "fusionGiveOrders",
          name: "fusionGiveOrders",
          component: FusionGiveOrders
        },
        {
          path: "fusionOrderPrizes",
          name: "fusionOrderPrizes",
          component: FusionOrderPrizes
        },
        {
          path: "fusionLogs",
          name: "fusionLogs",
          component: FusionLogs
        },
        {
          path: "fusionPrizes",
          name: "fusionPrizes",
          component: FusionPrizes
        },
        {
          path: "fusionGoods",
          name: "fusionGoods",
          component: FusionGoods
        },
        {
          path: "climbTowerOrderPrizes",
          name: "climbTowerOrderPrizes",
          component: ClimbTowerOrderPrizes
        },
        {
          path: "towerTreasureGoods",
          name: "towerTreasureGoods",
          component: TowerTreasureGoods
        },
        {
          path: "towerTreasureBoxPrizes",
          name: "towerTreasureBoxPrizes",
          component: TowerTreasureBoxPrizes
        },
        {
          path: "climbTowerOrders",
          name: "climbTowerOrders",
          component: ClimbTowerOrders
        },
        {
          path: "climbTowers",
          name: "climbTowers",
          component: ClimbTowers
        },
        {
          path: "robots",
          name: "robots",
          component: Robots
        },
        {
          path: "whiteList",
          name: "whiteList",
          component: WhiteList
        },
        {
          path: "paySettings",
          name: "paySettings",
          component: PaySettings
        },
        {
          path: "index",
          name: "index",
          component: Index
        },
        {
          path: "wealRoomsOrdersPrizes",
          name: "wealRoomsOrdersPrizes",
          component: WealRoomsOrdersPrizes
        },
        {
          path: "systemAnnouncement",
          name: "systemAnnouncement",
          component: SystemAnnouncement
        },
        {
          path: "admin",
          name: "admin",
          component: Admin
        },
        {
          path: "role",
          name: "role",
          component: Role
        },
        {
          path: "permission",
          name: "permission",
          component: Permission
        },
        {
          path: "menu",
          name: "menu",
          component: Menu
        },
        {
          path: "password",
          name: "password",
          component: Password
        },
        {
          path: "goods",
          name: "goods",
          component: Goods
        },
        {
          path: "redPackets",
          name: "redPackets",
          component: RedPackets
        },
        {
          path: "order",
          name: "order",
          component: Order
        },
        {
          path: "user",
          name: "user",
          component: User
        },
        {
          path: "goodsAttr",
          name: "goodsAttr",
          component: GoodsAttr
        },
        {
          path: "banner",
          name: "banner",
          component: Banner
        },

        {
          path: "userWithdraw",
          name: "userWithdraw",
          component: UserWithdraw
        },
        {
          path: "setting",
          name: "setting",
          component: Setting
        },
        {
          path: "freight",
          name: "freight",
          component: Freight
        },
        {
          path: "question",
          name: "question",
          component: Question
        },
        {
          path: "questionCate",
          name: "questionCate",
          component: QuestionCate
        },
        {
          path: "content",
          name: "content",
          component: Content
        },
        {
          path: "contentCate",
          name: "contentCate",
          component: ContentCate
        },
        {
          path: "goodsCate",
          name: "goodsCate",
          component: GoodsCate
        },
        {
          path: "expressInfo",
          name: "expressInfo",
          component: ExpressInfo
        },
        {
          path: "blindBox",
          name: "blindBox",
          component: BlindBox
        },
        {
          path: "wealRooms",
          name: "wealRooms",
          component: WealRooms
        },
        {
          path:"wealRoomsOrders",
          name:"wealRoomsOrders",
          component:WealRoomsOrders,
        },
        {
          path: "blindBoxGoods",
          name: "blindBoxGoods",
          component: BlindBoxGoods
        },
        {
          path: "blindBoxGoodsLevel",
          name: "blindBoxGoodsLevel",
          component: BlindBoxGoodsLevel
        },
        {
          path: "userLevel",
          name: "userLevel",
          component: UserLevel
        },
        {
          path: "userRole",
          name: "userRole",
          component: UserRole
        },
        {
          path: "pop",
          name: "pop",
          component: Pop
        },
        {
          path: "version",
          name: "version",
          component: Version
        },
        {
          path: "image",
          name: "image",
          component: Image
        },
        {
          path: "express",
          name: "express",
          component: Express
        },

        {
          path: "rechargePanel",
          name: "rechargePanel",
          component: RechargePanel
        },
        {
          path: "theme",
          name: "theme",
          component: themeIndex
        },
        {
          path: "rechargeOrder",
          name: "rechargeOrder",
          component: RechargeOrder
        },
        {
          path: "commission",
          name: "commission",
          component: Commission
        },
        {
          path: "blindBoxOrderPrize",
          name: "blindBoxOrderPrize",
          component: BlindBoxOrderPrize
        },
        {
          path: "blindBoxOrder",
          name: "blindBoxOrder",
          component: BlindBoxOrder
        },
        {
          path: "takeOrder",
          name: "takeOrder",
          component: TakeOrder
        },
        {
          path: "area",
          name: "area",
          component: Area
        },
        {
          path: "coupon",
          name: "coupon",
          component: Coupon
        },
        {
          path: "adminRechargeLog",
          name: "adminRechargeLog",
          component: AdminRechargeLog
        },
        {
          path: "adminActionLog",
          name: "adminActionLog",
          component: AdminActionLog
        },
        {
          path: "adminActionLogs",
          name: "adminActionLogs",
          component: AdminActionLogs
        },
        {
          path: "smsLog",
          name: "smsLog",
          component: SmsLog
        },

        {
          path: "balanceLog",
          name: "balanceLog",
          component: BalanceLog
        },
        {
          path: "amountLog",
          name: "amountLog",
          component: AmountLog
        },
        {
          path: "userProfileLog",
          name: "userProfileLog",
          component: UserProfileLog
        },
        {
          path: "cooperate",
          name: "cooperate",
          component: Cooperate
        },
        {
          path: "userLevelModify",
          name: "userLevelModify",
          component: UserLevelModify
        },
        {
          path: "userParentModify",
          name: "userParentModify",
          component: UserParentModify
        },
        {
          path: "userCoupon",
          name: "userCoupon",
          component: UserCoupon
        },
        {
          path: "feedback",
          name: "feedback",
          component: Feedback
        },
        {
          path: "blindBoxGiveOrder",
          name: "blindBoxGiveOrder",
          component: BlindBoxGiveOrder
        },
        {
          path: "backCard",
          name: "backCard",
          component: BackCard
        },
        {
          path: "couponPanel",
          name: "couponPanel",
          component: CouponPanel
        },
        {
          path: "signPanel",
          name: "signPanel",
          component: SignPanel
        },
        {
          path: "promotion",
          name: "promotion",
          component: Promotion
        },
        {
          path: "rank",
          name: "rank",
          component: Rank
        },
        {
          path: "userData",
          name: "userData",
          component: UserData
        },
        {
          path: "boxData",
          name: "boxData",
          component: BoxData
        },
        {
          path: "userBackCard",
          name: "userBackCard",
          component: UserBackCard
        },
        {
          path: "task",
          name: "task",
          component: Task
        }
      ]
    },

    {
      path: "*",
      name: "error",
      component: Error
    }
  ]
});
